-- GENERATED SPELL FOR [Goretooth] --


function spell0_17144(pUnit, Event) --@Blood Leech,Heal--
pUnit:FullCastSpellOnTarget(38887,pUnit)
pUnit:RegisterEvent('Sorts_17144', 650, 1)
end

function spell1_17144(pUnit, Event) --@Gushing Wound,n/a--
pUnit:FullCastSpellOnTarget(39215,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17144', 25000, 1)
end

function spell2_17144(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(3604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17144', 8000, 1)
end

function Sorts_17144(pUnit, Event)
local choix_sorts_17144 = math.random(0, 2)
if choix_sorts_17144 == 0 then
pUnit:RegisterEvent('spell0_17144', 1, 1)
end
if choix_sorts_17144 == 1 then
pUnit:RegisterEvent('spell1_17144', 1, 1)
end
if choix_sorts_17144 == 2 then
pUnit:RegisterEvent('spell2_17144', 1, 1)
end
end

function mob17144_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17144', math.random(1500, 3000), 1)
end

function mob17144_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17144_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17144_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17144, 1, 'mob17144_Action')
RegisterUnitEvent(17144, 2, 'mob17144_Leave')
RegisterUnitEvent(17144, 3, 'mob17144_Kill')
RegisterUnitEvent(17144, 4, 'mob17144_Die')
